﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceModel;
using System.Data;
using IsikFx.Project.CommonTypes;
using System.Runtime.Serialization;
using IsikFx.Project.CommonTypes.Announcement;
using IsikFx.Project.CommonTypes.Fund;
using IsikFx.Project.CommonTypes.User;
using IsikFx.Project.CommonTypes.CRUD;
using IsikFx.Project.CommonTypes.Watchman;
using IsikFx.Project.CommonTypes.FundLog;
namespace IsikFx.Project.WcfService
{
    [ServiceContract()]
    public interface IService
    {
        [OperationContract()]
        bool WcfIsAlive();

        [OperationContract()]
        bool CheckFirstLogin(string domainName);

        [OperationContract()]
        CrudResponseMessage InsertNewFund(string domainName, string fundAmount, int fundDate, int fundMonth, int fundYear);

        [OperationContract]
        FundResponseMessage GetNewFunds();

        [OperationContract()]
        CrudResponseMessage UpdateShownFunds(int id);

        [OperationContract()]
        CrudResponseMessage UpdateUserAccount(int id);

        [OperationContract()]
        int GetUserIDFromDomain(string domainName);

        [OperationContract()]
        CrudResponseMessage UpdateUserRole(int id, int salesOrRetaintion);

        [OperationContract()]
        CrudResponseMessage InsertNewUser(string name, string surname, int teamId, int role, string domainName);

        [OperationContract()]
        UserResponseMessage GetCurrentUser(string domainName);

        [OperationContract()]
        CrudResponseMessage CreateNewCustomer(int agentID, string customerName, string customerSurname,
                                    string loginNo, string accountOpenDate, string firstFundDate,
                                    string firstFundAmount, string currencyType);
        [OperationContract]
        List<Customer> GetCustomers(int agentID);

        [OperationContract]
        UserResponseMessage GetUsersByRole(int role);

        [OperationContract]
        CrudResponseMessage UpdateFundShownStatus(int id);

        [OperationContract]
        bool Test();

        [OperationContract()]
        CrudResponseMessage UpdateAgentGoal(int agentID, string fundGoal, string accountGoal, string currencyType, bool insert);

        [OperationContract()]
        Goal GetAgentGoal(int agentID);

        [OperationContract()]
        GoalProgress GetGoalProgress(int agentID);

        [OperationContract()]
        AnnouncementResponseMessage GetActiveAnnouncementsAsAdmin(int adminID);

        [OperationContract()]
        AnnouncementResponseMessage GetActiveAnnouncementsAsUser(int roleType);

        [OperationContract()]
        CrudResponseMessage InsertAnnouncement(int adminID, string announcementID, string announcementTitle, string announcement, string createDate, int roleType);

        [OperationContract()]
        CrudResponseMessage ResetGoals();

        [OperationContract]
        CrudResponseMessage DeleteAnnouncement(int id);

        [OperationContract]
        CrudResponseMessage UpdateWatchmenTable(List<Watchman> watchManList);

        [OperationContract]
        WatchmanResponseMessage GetWatchmenList(string watchmanDate);

        [OperationContract]
        CrudResponseMessage SaveUsersPhoto(string fileName, byte[] stream);

        [OperationContract]
        FundLogResponseMessage GetMinusFundLogs(string userID, string date);

        [OperationContract]
        FundLogResponseMessage GetPlusFundLogs(string userID, string date);

        [OperationContract]
        FundLogResponseMessage GetAllFundLogs(string userID, string date);

        [OperationContract]
        CrudResponseMessage InsertFundLog(string userID, string fundAmount, int isFundOut, string fundDate, string fundTime);
    }
}
